Check for getc_unlocked.
authorMatthias Clasen <mclasen@redhat.com>
Fri, 22 Dec 2006 16:13:49 +0000 (16:13 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 22 Dec 2006 16:13:49 +0000 (16:13 +0000)
2006-12-22  Matthias Clasen  <mclasen@redhat.com>

        * configure.in: Check for getc_unlocked.

        * gtk/xdgmime/xdgmimemagic.c: Use getc if getc_unlocked is
        unavailable.   (#381499)

ChangeLog
configure.in
gtk/xdgmime/xdgmimemagic.c

index a3d56724895ba63cd5a0cb9e622958fadc78c2eb..cde103b9e088baf5312c138f6b68b899817c1a2b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
 2006-12-22  Matthias Clasen  <mclasen@redhat.com>
+       
+       * configure.in: Check for getc_unlocked.
+
+       * gtk/xdgmime/xdgmimemagic.c: Use getc if getc_unlocked is
+       unavailable.   (#381499)
 
        * tests/teststatusicon.c: Fix a typo
 
index 2e8560719362a1bb7ff91bc60640c3a6f2ae60ad..9d0aa2653d5b42a875b751456c8fd9378ef1f0c9 100644 (file)
@@ -398,7 +398,7 @@ if test "x$enable_rebuilds" = "xyes" && \
 fi
 AC_SUBST(REBUILD)
 
-AC_CHECK_FUNCS(lstat mkstemp flockfile)
+AC_CHECK_FUNCS(lstat mkstemp flockfile getc_unlocked)
 
 # _NL_TIME_FIRST_WEEKDAY is an enum and not a define
 AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY])
index 8258b2bb1bc814ff7f9dd632ea38d178b8a381b6..6088edb276b052cd65568e2bb43c5cdb941b5ad3 100644 (file)
 #define        TRUE    (!FALSE)
 #endif
 
+#if !defined getc_unlocked && !defined HAVE_GETC_UNLOCKED
+# define getc_unlocked(fp) getc (fp)
+#endif
+
 typedef struct XdgMimeMagicMatch XdgMimeMagicMatch;
 typedef struct XdgMimeMagicMatchlet XdgMimeMagicMatchlet;